package com.yunsc.store.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yunsc.common.serializer.TimestampToDateSerializer;
import com.yunsc.media.entity.YunscUploadFileEntity;
import lombok.Data;

import java.io.Serializable;

/**
 * 商家(商户)记录表
 *
 * @author adan
 * @email 2028038953@qq.com
 * @date 2024-04-05 01:37:45
 */
@Data
@TableName("yunsc_store")
public class YunscStoreEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 商城ID
     */
    @TableId
    private Integer storeId;
    /**
     * 商城名称
     */
    private String storeName;
    /**
     * 商城简介
     */
    @TableField("`describe`")
    private String describe;
    /**
     * 商城logo文件ID
     */
    private Integer logoImageId;
    /**
     * 排序(数字越小越靠前)
     */
    private Integer sort;
    /**
     * 是否回收
     */
    private Integer isRecycle;
    /**
     * 是否删除
     */
    private Integer isDelete;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer createTime;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer updateTime;

    @TableField(exist = false)
    @JsonProperty("logoImage")
    private YunscUploadFileEntity logoImage;

}
